'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 精炼相关
 * @author sundbcn@gmail.com (sun debing)
 */

var equipConf = require('../config/equipConf');

/**
 * 获取到达某个精炼等级需要的金币
 * @param  {[type]} barn_lv [description]
 * @return {[type]}          [description]
 */
exports.getRefineToLvNeedGold = function (refine_lv) {
    var refine_conf = equipConf.getEquipLvConf(refine_lv);
    if (!refine_conf) {
        return 0;
    }
    return refine_conf.all_cost;
};

/**
 * 获取精炼某个等级需要的金币
 * @param  {[type]} refine_lv [description]
 * @return {[type]}           [description]
 */
exports.getRefineNeedGold = function (refine_lv) {
    var refine_conf = equipConf.getEquipLvConf(refine_lv);
    if (!refine_conf) {
        return 0;
    }
    return refine_conf.cost_gold;
};
